//调用接口配置文件
import { request } from 'config/request'
// 定义接口
// 获取省市区
export async function queryAllAddress(params) {
	return request({
		url: 'admin/address/queryAllAddress',
		method: 'GET',
		data: params,
	});
};

// 获取市对应的楼盘
export async function getCityEstateList(params) {
	return request({
		url: 'admin/estate/adminList',
		method: 'POST',
		data: params,
	});
};

//楼盘列表
export async function houseListGet(params) {
	return request({
		url: 'admin/estate/adminList',
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };
  //获取置业顾问
export async function counselorServ(params) {
	return request({
		url: `admin/liveBroadcast/queryCounselorByProductId/${params}`,
		method: 'GET',
		// data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };

   //直播平台列表
export async function uuseeListServ(params) {
	return request({
		url: `admin/uuseeConfig/queryList`,
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };
     //新增直播
export async function createLive(params) {
	return request({
		url: `admin/liveBroadcast/add`,
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };

//编辑直播
export async function updateLive(params) {
	return request({
		url: `admin/liveBroadcast/update`,
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };

  //直播详情
export async function detailServ(params) {
	console.log(params)
	return request({
		url: `admin/liveBroadcast/detail/${params.id}`,
		method: 'GET',
		// data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
  };

  //发布直播
export async function livePublish(params) {
	console.log(params)
	return request({
		url: `admin/liveBroadcast/publish`,
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
};

  //取消发布
export async function liveCancelPublish(params) {
	console.log(params)
	return request({
		url: `admin/liveBroadcast/cancelPublish`,
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
};

//查询主播接口

export async function searchAnchor(params) {
	console.log(params)
	return request({
		url: `admin/propertyConsultant/queryFrom4A`,
		method: 'POST',
		data: params,
		headers:{
			"Content-type":"application/json",
		}
	});
};
